﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace StripeDemo.Models
{
    public class Charge
    {
        [Required(ErrorMessage = "CustomerId is required")]
        [StringLength(50, MinimumLength = 1)]
        public string CustomerId { get; set; }

        [Required(ErrorMessage = "Currency is required")]
        [StringLength(4, MinimumLength = 1)]
        public string Currency { get; set; }

        [Required(ErrorMessage = "Amount is required")]
        [Range(0.5, 1000000)]
        [DataType(DataType.Currency)]
        public int Amount { get; set; }

        [Required(ErrorMessage = "ExtraTransactionInfo is required")]
        [StringLength(500, MinimumLength = 1)]
        public string ExtraTransactionInfo { get; set; }

        public string CardNum { get; set; }
        public string ReceiptMail { get; set; }
    }
}